package usaco.c2009.march.bronze;

import java.util.Arrays;
import java.util.Scanner;

/*
 * p3205
 * USACO 2009 March - Bronze
 */

public class p3205 {

	static int N;
	static int[] num, list;

	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		N = scanner.nextInt();
		num = new int[N];
		list = new int[N];
		for (int i=0;i<N;++i) {
			for (int j=0;j<N;++j) {
				num[j] = scanner.nextInt();
			}
			Arrays.sort(num);
			list[i] = num[N/2];
		}
		Arrays.sort(list);
		System.out.println(list[N/2]);

	}

}
